package com.ytktt.study.week8.task6.shardingsphere.atomikosxa.mapper.item;

import com.ytktt.study.week8.task6.shardingsphere.atomikosxa.entity.item.ItemStockEntity;
import org.apache.ibatis.annotations.Param;

public interface ItemStockMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(ItemStockEntity record);

    int insertSelective(ItemStockEntity record);

    ItemStockEntity selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ItemStockEntity record);

    int updateByPrimaryKey(ItemStockEntity record);

    ItemStockEntity selectByItemId(int itemId);

    int updateDecreStock(@Param("itemId") int itemId, @Param("amount") int amount);
}